const { ccclass, property } = cc._decorator;

@ccclass
export default class UIManager extends cc.Component {
    static Instance: UIManager;

    @property(cc.Canvas)
    canvas: cc.Canvas = null;
    @property(cc.Node)
    UI_1: cc.Node = null;
    @property(cc.Node)
    UI_2: cc.Node = null;
    @property(cc.Node)
    UI_3: cc.Node = null;

    // @property(cc.Node)
    // Root_bg: cc.Node = null;
    @property(cc.Node)
    Root_grid: cc.Node = null;
    @property(cc.Node)
    Root_board: cc.Node = null;
    // @property(cc.Node)
    // Root_card: cc.Node = null;
    @property(cc.Node)
    Root_effect: cc.Node = null;
    @property(cc.Node)
    Root_block: cc.Node = null;

    @property(cc.Node)
    LayerNode: cc.Node = null;

    @property(cc.Node)
    GeneratePoint_blook: cc.Node = null;

    // @property(cc.Node)
    // GeneratePoint_blook: cc.Node = null;

    @property(cc.Node)
    Root_Temp: cc.Node = null;

    @property(cc.Node)
    testNode: cc.Node = null;


    // @property(cc.Node)
    // DeadFrame: cc.Node = null;

    onLoad() {
        UIManager.Instance = this;

        for (let index = 0; index < this.node.childrenCount; index++) {
            let child = this.node.children[index];
            let active: boolean = child.active;
            child.active = true;
            child.active = active;
        }
        UIManager.AddListener();
    }

    static AddListener() { }
}

/** 调试 */
window["UIManager"] = UIManager;
